﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(CinerariumSaleMetadata))]//使用CinerariumSaleMetadata对CinerariumSale进行数据验证
    public partial class CinerariumSale : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "BuyerId")]
        public string BuyerIdOld { get; set; }
        
        [Display(Name = "DepositorId")]
        public string DepositorIdOld { get; set; }
        
        #endregion

    }
    public class CinerariumSaleMetadata
    {
			[ScaffoldColumn(false)]
			[Display(Name = "唯一标识", Order = 1)]
			public object RowGuid { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "创建时间", Order = 2)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? CreateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "创建人", Order = 3)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CreatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "主办人", Order = 4)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object BuyerId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存人", Order = 5)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object DepositorId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存日期", Order = 6)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.Date)]
			[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

			public DateTime? Date { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存天数", Order = 7)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? DateCount { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存费用", Order = 8)]
			public object Price { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "骨灰图片", Order = 9)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object Photo { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "备注", Order = 10)]
			[StringLength(4000, ErrorMessage = "长度不可超过4000")]
			public object Remark { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存地址", Order = 11)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object AddressName { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存地址唯一标识", Order = 12)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object AddressId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "寄存类型", Order = 13)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object Type { get; set; }


    }


}

